
pkgname=findutils
pkgver=4.6.0
pkgrel=3
pkgdesc="GNU utilities to locate files"
arch=('x86_64')
license=('GPL3')
groups=('base')
depends=('glibc' 'sh')
url="http://www.gnu.org/software/findutils"
source=("ftp://ftp.gnu.org/pub/gnu/findutils/findutils-${pkgver}.tar.gz")
md5sums=('9936aa8009438ce185bea2694a997fc1')

build() {
  cd ${pkgname}-${pkgver}

  ./configure --prefix=/usr \
    --with-packager="KaOS" \
    --with-packager-bug-reports="https://github.com/KaOSx/core/issues" \
    --libexecdir=/usr/lib
  make
}

check() {
  cd ${pkgname}-${pkgver}
  
  make check
}


package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR=${pkgdir} install
  
  # files used from mlocate
  rm ${pkgdir}/usr/bin/locate
  rm ${pkgdir}/usr/bin/updatedb
  rm ${pkgdir}/usr/share/man/man1/locate.1
  rm ${pkgdir}/usr/share/man/man1/updatedb.1
  rm -r ${pkgdir}/usr/share/man/man5
}
